package com.hdoit.apollo.logical.stock.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.hdoit.apollo.logical.stock.dao.IStockDao;
import com.hdoit.apollo.logical.stock.model.Stock;
import com.hdoit.apollo.logical.stock.model.StockStat;
import com.hdoit.apollo.logical.stock.service.IStockService;
import com.hdoit.apollo.logical.viewmodel.stock.StockInfo;
import com.hdoit.apollo.logical.viewmodel.stock.StockSearch;
import com.tennetcn.data.dao.base.impl.SuperService;
import com.tennetcn.data.message.PagerModel;
/**
 * @author      humaoshu
 * @email       
 * @createtime  2018年04月02日 11:37:58
 * @comment
 */
@Component
public class StockServiceImpl extends SuperService<Stock> implements IStockService{
	@Autowired
	private IStockDao stockDao;
	@Override
	public Stock queryModelByKey(String cargoId) {
		return stockDao.queryModelByKey(cargoId);
	}
	@Override
	public StockStat getStockStat(StockSearch search) {
		return stockDao.getStockStat(search);
	}
	@Override
	public Stock getStockByCargoNo(String cargoNo, String shopId) {
		return stockDao.getStockByCargoNo(cargoNo,shopId);
	}
	@Override

	public Stock queryModelByCargoId(String cargoId) {
		
		return stockDao.queryModelByCargoId(cargoId);
	}

	public Stock getStockByCargoId(String cargoId, String shopId) {
		return stockDao.getStockByCargoId(cargoId,shopId);
	}
	@Override
	public Stock queryModelByStockId(String stockId) {
		return stockDao.queryModelByStockId(stockId);
	}
	@Override
	public List<Stock> queryListList(StockSearch search, PagerModel pagerModel) {
		return stockDao.queryListList(search,pagerModel);
	}
	@Override
	public int queryCountList(StockSearch search) {
		return stockDao.queryCountList(search);
	}
	@Override
	public List<StockInfo> getListBysearch(StockSearch search) {
		return stockDao.getListBysearch(search);
	}
	@Override
	public boolean deleteByCargoId(String cargoId) {
		return stockDao.deleteByCargoId(cargoId);
	}
	@Override
	public List<StockInfo> getSupplierStocksBysearch(StockSearch search) {
		return stockDao.getSupplierStocksBysearch(search);
	}

}
